package com.hrt.demo.wsb.vaildate;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("demo/vaildate")
public class VaildateFormController {

	@RequestMapping("/show")
	public ModelAndView show()
	{
		ModelAndView mv=new ModelAndView();
		mv.setViewName("manage/demo/vaildation/index");
		return mv;
	}
	
	@ResponseBody
	@RequestMapping(value="/checkUsername",method = RequestMethod.POST)
	public Map checkUsername(@RequestParam("param")String param,@RequestParam("name")String name)
	{
		System.out.println("hello world...");
		Map<String,Object> map=new HashMap<String,Object>();
		map.put("status", "n");
		map.put("info", "账号不可以使用");
		map.put("aa", "hello world");
		return map;
		
	}
}
